package cn.kgm.user.dto.entity;

import cn.kgm.core.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.SuperBuilder;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * # 技术改变自己 #
 * 用户授信IP
 * @author kappi
 * @date   2024-04-08 13:28:48
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@TableName(value = "user_ip")
@ApiModel(value = "UserIp", description = "用户授信IP")
public class UserIp extends Entity<Long>{

    /**
     * 用户登录IP
     */
    @ApiModelProperty(value = "用户登录IP")
    @TableField(value = "ip", condition = LIKE)
    private String ip;

    /**
     * 授信:[0,未授信];[1,已授信]
     */
    @ApiModelProperty(value = "授信:[0,未授信];[1,已授信]")
    @TableField(value = "trust")
    private Boolean trust;
}
